home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / util / misc / RC5Control.lha / RC5Control / RC5Control_PPC < prev    next >
Encoding:
Text File  |  1980-09-16  |  1.9 KB  |  54 lines

  1. ;$VER: RC5 Control 1.6.1 - v2.8010-463 compliant (16.09.2000)
  2. ;Copyright © 1999-2000 Daniel Pimley
  3.  
  4. FailAt 21
  5. Lab restart
  6.  
  7. If EXISTS ENV:RC5PPC
  8.  
  9.  If NOT EXISTS $RC5PPC
  10.   RequestChoice >NIL: "RC5 Control" "Bad options for PPC client" "Quit"
  11.   skip quit
  12.  EndIf
  13.  
  14.  If EXISTS ENV:PPC
  15.   Lab notquit
  16.   Status >ENV:PPC COMMAND=$RC5PPC
  17.   Break >NIL: PROCESS $PPC
  18.   If WARN
  19.    ; pulls final (#?.#?% done) from logfile and writes to $message
  20.    rx "Parse ARG LOGFILE; If Open(RC5log,LOGFILE,'r') Then; Do; newmess='log unreadable.'; Do until EOF(RC5log); mess=ReadLn(RC5log); If Pos('Saved',mess)>0 THEN; newmess=mess; If Pos('Shutdown',mess)>0 THEN; newmess=mess; End; Close(RC5log); If newmess~='log unreadable.' THEN; PARSE VAR newmess '] ' newmess; End; Else newmess='statistics unavailable.'; Open(RC5msg,'ENV:message','w'); WriteLn(RC5msg,'*n'||newmess); Close(RC5msg)" $PPCLOG
  21.    RequestChoice >NIL: "RC5 Control" "PPC client shutdown:$message" "OK"
  22.    UnSetENV PPC
  23.   Else
  24.    Wait 3
  25.    skip notquit BACK
  26.   EndIf
  27.  Else
  28.   Run >NIL: $RC5PPC
  29.   Status >ENV:PPC COMMAND=$RC5PPC
  30.   RequestChoice >NIL: "RC5 Control" "PPC client installed" "OK"
  31.  EndIf
  32.  
  33. Else
  34.  
  35.  RequestFile >ENV:RC5PPC DRAWER="SYS:" FILE="dnetc_PPC" TITLE="Select PPC Client" NOICONS
  36.  RequestFile >ENV:PPCLOG DRAWER="SYS:" FILE="dnetc_PPC.log" TITLE="Select PPC Logfile" NOICONS
  37.  
  38.  Which >NIL: $RC5PPC 
  39.  If WARN
  40.   UnsetENV RC5PPC
  41.   RequestChoice >NIL: "RC5 Control" "Invalid selection" "Quit"
  42.   skip quit
  43.  Else
  44.   ; strips path data to match client process name and enable a status call
  45.   rx "Parse ARG CLIENT; CLIENT=Translate(CLIENT,'','""'); gofrom=LastPos('/',CLIENT); If gofrom>0 THEN; newmess=SubStr(CLIENT,gofrom+1); Else; Do; gofrom=LastPos(':',CLIENT); If gofrom>0 THEN; newmess=SubStr(CLIENT,gofrom+1); Else; newmess=CLIENT; End; Open(RC5cli,'ENV:RC5PPC','w'); WriteLn(RC5cli, '""'||newmess||'""'); Close(RC5cli)" $RC5PPC
  46.   Copy >NIL: ENV:RC5PPC ENVARC:
  47.   Copy >NIL: ENV:PPCLOG ENVARC:
  48.  EndIf
  49.  
  50.  Skip restart BACK
  51.  
  52. EndIf
  53.  
  54. Lab quit